-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: port pyclient build config to pyproject.toml #1470
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks great, i really like it! there are waaaaaay too many comments in here tho....
# https://packaging.python.org/en/latest/tutorials/packaging-projects/#choosing-a-build-backend | ||
[build-system] | ||
# A list of packages that are needed to build your package: | ||
requires = ["setuptools>=61.0.0"] # REQUIRED if [build-system] table is used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does that version get us? the sample/template pyproject.toml
doesnt specify it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yea, it's not necessary here, I'll remove it. It's needed to support the dynamic version feature (see the callout box in bullet 1 here "As of the release of setuptools 61.0.0..."). I used it in delphi-logger though and it works!
Co-authored-by: george <george.haff@gmail.com>
Co-authored-by: george <george.haff@gmail.com>
Co-authored-by: george <george.haff@gmail.com>
Co-authored-by: george <george.haff@gmail.com>
Co-authored-by: george <george.haff@gmail.com>
Co-authored-by: george <george.haff@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, except i dont think this line is going to work any more:
python setup.py sdist bdist_wheel |
which probably also means updating this line:
pip install wheel twine |
and we should put an entry in https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/packaging/pypi/CHANGELOG.md
Quality Gate passedIssues Measures |
Good point, thanks! I swapped the commands over to the new ones (sdist and wheel) and added the new Also updated the publish action based on hints from my IDE: And updated changelog too (I figure we can just keep the changelog dates approximate? Doesn't feel like a big deal if those are one day off). |
we can always fix the date on release day |
Summary:
I hoped the more modern config's dynamic metadata would work, but it only works if
__version__
is defined explicitly in__init__.py
, not imported fromdelphi_epidata.py
(importingdelphi_epidata.py
errors at build-time because the dependencies in that file aren't installed in the build environment (just setuptools)).So, this doesn't come with a useful feature, it's just a lateral move to the more modern packaging config.
On the plus side, I learned a lot by reading parts of these guides:
Might be handy in the future when we do #939 and other such changes.
Prerequisites:
dev
branchdev